<?php
/**
 * Created by PhpStorm.
 * User: zzw
 * Date: 17-4-8
 * Time: 上午9:08
 */
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Withdrawapply_model extends MY_Model {

    protected $table = 'withdraw_apply';
    public function set($id,$arr)
    {
        $this->db->set($arr)
            -> where(array('id'=>$id))
            -> update($this->table);
        return $this->db->affected_rows();
    }
    /**
     * 用户未进行审核的数量
     */
    public function get_status_nums(){
        $query = $this->db
            ->select('count(*) as total')
            ->from($this->table)
            ->where('is_checked',0)
            ->get();
        return $query->row_array();
    }
}